#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct student
{
	int id;
	char name[20];
	float score;
} stu,*stu_ptr,stu_Arr[5];
int main(int argc, const char *argv[])
{
	//定义学生结构体类型变量a
	stu a={1001,"石青璋",90.5};
	//学生结构体类型指针变量p
	stu_ptr p=&a;
	//定义结构体类型数组
	stu_Arr arr={{1001,"北",90.1},{1002,"京",90.2},{1003,"欢",90.3},{1004,"迎",},{1005,"你",90.5}};


	for(int i=0;i<5;i++)
		printf("学号：%d 姓名：%s 成绩：%.2f\n",arr[i].id,arr[i].name,arr[i].score);
	scanf(" %d",&a.id);
	printf("学号：%d 姓名：%s 成绩：%.2f\n",a.id,a.name,a.score);
	//指针直接引用
	printf("学号：%d 姓名：%s 成绩：%.2f\n",p->id,p->name,p->score);
	return 0;
}
